1. Technical Field
The present invention relates to a photoelectric sensor used for, for example, detecting the passage of a moving object through a target location or detecting a change in the orientation of an object. The present invention also relates to a method for aiding the checking of whether a threshold set for a photoelectric sensor used for such detection is appropriate.
2. Description of the Related Art
Examples of photoelectric sensors include a type (transmission type) that receives light emitted from a light-projecting unit and passed through an area for detecting an object to be detected (hereinafter referred to as a detection target), and a type (reflection type) that receives light emitted from a light-projecting unit and then reflected by a detection target. The sensors of both types convert a signal indicating an amount of received light, output from a light-receiving unit, into digital data and input the converted data (hereinafter referred to as “data on an amount of received light”) into a processing circuit that incorporates a microprocessor. Then, these sensors compare the value of the data on the amount of received light with a preset threshold to determine the presence or absence of a detection target. They subsequently output a detection signal indicating an ON-state if the presence of the detection target is detected. Depending on the purpose of each sensor, the sensor may calculate the change or the moving average of amounts of received light and compare the value obtained from this measurement with a threshold, thereby determining the presence or absence of an object.
In order to reliably detect a detection target by use of such a photoelectric sensor, it is necessary to set a threshold that has sufficient margin both for the level of measurement data before the data are changed by the detection target (hereinafter referred to as “off level”) and for significantly changed area of measurement data (hereinafter referred to as “peak level”). This is because if a value close to the off level is set as a threshold, the measurement data is susceptible to noise. Generally, as the threshold approaches the peak level, the time period during which the measurement data exceed the threshold shortens. Correspondingly, the number of measurement data exceeding the threshold decreases, whereby detection reliability deteriorates.
In order to set an appropriate threshold that takes the foregoing drawbacks into account, it is desirable to specify an appropriate value for the threshold after checking how measurement data change in accordance with movements of a detection target. However, if detection targets move at high speed, signals indicating the amount of received light and measurement data obtained from such signals change very fast, and it is very difficult to check such changes.
In order to overcome the foregoing problem, some of conventional photoelectric sensors measure the length of time period during which a detection signal is off (hereinafter referred to as “OFF-period”) and the length of time period during which a detection signal is on (hereinafter referred to as “ON-period”), and then display the lengths of these periods side by side, thereby enabling a user to know the degree of operational reliability of the sensor (refer to, for example, Japanese Patent Application Laid-Open No. 2007-93464).